<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: Serial Peripheral Interface (SPI)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__spi.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">Serial Peripheral Interface (SPI)</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structspi__master__config__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#structspi__master__config__t">spi_master_config_t</a></td></tr>
<tr class="memdesc:structspi__master__config__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI master user configure structure.  <a href="group__spi.html#structspi__master__config__t">More...</a><br /></td></tr>
<tr class="separator:structspi__master__config__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structspi__slave__config__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#structspi__slave__config__t">spi_slave_config_t</a></td></tr>
<tr class="memdesc:structspi__slave__config__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI slave user configure structure.  <a href="group__spi.html#structspi__slave__config__t">More...</a><br /></td></tr>
<tr class="separator:structspi__slave__config__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structspi__transfer__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a></td></tr>
<tr class="memdesc:structspi__transfer__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI transfer structure.  <a href="group__spi.html#structspi__transfer__t">More...</a><br /></td></tr>
<tr class="separator:structspi__transfer__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:struct__spi__master__handle"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#struct__spi__master__handle">spi_master_handle_t</a></td></tr>
<tr class="memdesc:struct__spi__master__handle"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI transfer handle structure.  <a href="group__spi.html#struct__spi__master__handle">More...</a><br /></td></tr>
<tr class="separator:struct__spi__master__handle"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gad267cfee3a876b2860217ff94f03f574"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad267cfee3a876b2860217ff94f03f574"></a>
typedef spi_master_handle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a></td></tr>
<tr class="memdesc:gad267cfee3a876b2860217ff94f03f574"><td class="mdescLeft">&#160;</td><td class="mdescRight">Slave handle is the same with master handle. <br /></td></tr>
<tr class="separator:gad267cfee3a876b2860217ff94f03f574"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75d9df6e4614756d8ff1bd6f86ca2235"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga75d9df6e4614756d8ff1bd6f86ca2235"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga75d9df6e4614756d8ff1bd6f86ca2235">spi_master_callback_t</a>) (SPI_Type *base, spi_master_handle_t *handle, <a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> status, void *userData)</td></tr>
<tr class="memdesc:ga75d9df6e4614756d8ff1bd6f86ca2235"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI master callback for finished transmit. <br /></td></tr>
<tr class="separator:ga75d9df6e4614756d8ff1bd6f86ca2235"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13fbc3110c56c1d312e4a5ebed07d679"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga13fbc3110c56c1d312e4a5ebed07d679"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga13fbc3110c56c1d312e4a5ebed07d679">spi_slave_callback_t</a>) (SPI_Type *base, <a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *handle, <a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> status, void *userData)</td></tr>
<tr class="memdesc:ga13fbc3110c56c1d312e4a5ebed07d679"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI master callback for finished transmit. <br /></td></tr>
<tr class="separator:ga13fbc3110c56c1d312e4a5ebed07d679"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga3fa79a6717ea4e1e74de2dadaa468edd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga3fa79a6717ea4e1e74de2dadaa468edd">_spi_status</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga3fa79a6717ea4e1e74de2dadaa468edda703abdf7900047c4d13536480f3463ab">kStatus_SPI_Busy</a> = MAKE_STATUS(kStatusGroup_SPI, 0), 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga3fa79a6717ea4e1e74de2dadaa468edda4e32c5b06dccaf4b81e2fd1679e1b560">kStatus_SPI_Idle</a> = MAKE_STATUS(kStatusGroup_SPI, 1), 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga3fa79a6717ea4e1e74de2dadaa468edda2ff91d774e93aed936b87ffaa18aaf9e">kStatus_SPI_Error</a> = MAKE_STATUS(kStatusGroup_SPI, 2)
<br />
 }<tr class="memdesc:ga3fa79a6717ea4e1e74de2dadaa468edd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return status for the SPI driver.  <a href="group__spi.html#ga3fa79a6717ea4e1e74de2dadaa468edd">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga3fa79a6717ea4e1e74de2dadaa468edd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e5a7cd043c9596779bc23b34cb3d1f9"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga3e5a7cd043c9596779bc23b34cb3d1f9">spi_clock_polarity_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga3e5a7cd043c9596779bc23b34cb3d1f9a031c0ee2693cf1fd621e8b8cba676629">kSPI_ClockPolarityActiveHigh</a> = 0x0U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga3e5a7cd043c9596779bc23b34cb3d1f9acfc8257079c9604086622df6de326aea">kSPI_ClockPolarityActiveLow</a>
<br />
 }<tr class="memdesc:ga3e5a7cd043c9596779bc23b34cb3d1f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI clock polarity configuration.  <a href="group__spi.html#ga3e5a7cd043c9596779bc23b34cb3d1f9">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga3e5a7cd043c9596779bc23b34cb3d1f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ad313685ade497f5cbcb71c74a1b4dc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga9ad313685ade497f5cbcb71c74a1b4dc">spi_clock_phase_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga9ad313685ade497f5cbcb71c74a1b4dcad15d61c6fd642f13101edbf401d0c72e">kSPI_ClockPhaseFirstEdge</a> = 0x0U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga9ad313685ade497f5cbcb71c74a1b4dca18a98985c1f7dd56175e4a2724db3675">kSPI_ClockPhaseSecondEdge</a>
<br />
 }<tr class="memdesc:ga9ad313685ade497f5cbcb71c74a1b4dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI clock phase configuration.  <a href="group__spi.html#ga9ad313685ade497f5cbcb71c74a1b4dc">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga9ad313685ade497f5cbcb71c74a1b4dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa68518c16202382c2e1f1c7c66a9d53d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaa68518c16202382c2e1f1c7c66a9d53d">spi_shift_direction_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#ggaa68518c16202382c2e1f1c7c66a9d53dae7b997e8cff761aab865cbd42c4c3989">kSPI_MsbFirst</a> = 0x0U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaa68518c16202382c2e1f1c7c66a9d53da20ac53684c3e1ad338553cecbfab94a9">kSPI_LsbFirst</a>
<br />
 }<tr class="memdesc:gaa68518c16202382c2e1f1c7c66a9d53d"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI data shifter direction options.  <a href="group__spi.html#gaa68518c16202382c2e1f1c7c66a9d53d">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gaa68518c16202382c2e1f1c7c66a9d53d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e5a238c65f35a2d82cc1c55927030fe"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga2e5a238c65f35a2d82cc1c55927030fe">spi_ss_output_mode_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga2e5a238c65f35a2d82cc1c55927030fea3825177650b5d4bfb5dc603f0ce41381">kSPI_SlaveSelectAsGpio</a> = 0x0U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga2e5a238c65f35a2d82cc1c55927030feafdcbdc624d6c2f057147e2aa3cae4635">kSPI_SlaveSelectFaultInput</a> = 0x2U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga2e5a238c65f35a2d82cc1c55927030fead724fc04589d03b524ef2dfef6b0f4a1">kSPI_SlaveSelectAutomaticOutput</a> = 0x3U
<br />
 }<tr class="memdesc:ga2e5a238c65f35a2d82cc1c55927030fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI slave select output mode options.  <a href="group__spi.html#ga2e5a238c65f35a2d82cc1c55927030fe">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga2e5a238c65f35a2d82cc1c55927030fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab55fee4d636428392047e3355f33a36f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gab55fee4d636428392047e3355f33a36f">spi_pin_mode_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#ggab55fee4d636428392047e3355f33a36fa7ba3d5ffce8458f91a9594e7ffe2b32d">kSPI_PinModeNormal</a> = 0x0U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggab55fee4d636428392047e3355f33a36fad778c9cc9e3d5a5c4e8061793cf50fdc">kSPI_PinModeInput</a> = 0x1U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggab55fee4d636428392047e3355f33a36fad5b79c8eba688dbfb4b9973348521de7">kSPI_PinModeOutput</a> = 0x3U
<br />
 }<tr class="memdesc:gab55fee4d636428392047e3355f33a36f"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI pin mode options.  <a href="group__spi.html#gab55fee4d636428392047e3355f33a36f">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gab55fee4d636428392047e3355f33a36f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7bfe75c1f0ea3b349f19a3de19b24e4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaa7bfe75c1f0ea3b349f19a3de19b24e4">spi_data_bitcount_mode_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#ggaa7bfe75c1f0ea3b349f19a3de19b24e4a1a0723fd8cd73f361ca2770ad74a6324">kSPI_8BitMode</a> = 0x0U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaa7bfe75c1f0ea3b349f19a3de19b24e4a740c43589ebe839f3adc77b8ca484ea4">kSPI_16BitMode</a>
<br />
 }<tr class="memdesc:gaa7bfe75c1f0ea3b349f19a3de19b24e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI data length mode options.  <a href="group__spi.html#gaa7bfe75c1f0ea3b349f19a3de19b24e4">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gaa7bfe75c1f0ea3b349f19a3de19b24e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaedd690a0f91a0a9eb0fd573b57e31f67"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaedd690a0f91a0a9eb0fd573b57e31f67">_spi_interrupt_enable</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#ggaedd690a0f91a0a9eb0fd573b57e31f67aa317b77c827ed1462b766dddd93f7f10">kSPI_RxFullAndModfInterruptEnable</a> = 0x1U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaedd690a0f91a0a9eb0fd573b57e31f67abe157750a1660d839a66197c56ac5096">kSPI_TxEmptyInterruptEnable</a> = 0x2U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaedd690a0f91a0a9eb0fd573b57e31f67a95cc9167ada10046534dc22549c6a99e">kSPI_MatchInterruptEnable</a> = 0x4U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaedd690a0f91a0a9eb0fd573b57e31f67a081a753d8d51b97b289103c698703537">kSPI_RxFifoNearFullInterruptEnable</a> = 0x8U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaedd690a0f91a0a9eb0fd573b57e31f67a299b7d97e4106d57bf06a6654ce4f3dd">kSPI_TxFifoNearEmptyInterruptEnable</a> = 0x10U
<br />
 }<tr class="memdesc:gaedd690a0f91a0a9eb0fd573b57e31f67"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI interrupt sources.  <a href="group__spi.html#gaedd690a0f91a0a9eb0fd573b57e31f67">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gaedd690a0f91a0a9eb0fd573b57e31f67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea776f478792865a85b7311e6ff5896c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaea776f478792865a85b7311e6ff5896c">_spi_flags</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896cacc0e5c67e296cc20197afaca46f22953">kSPI_RxBufferFullFlag</a> = SPI_S_SPRF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca9c24fe83960ed64638f06eeb17643da5">kSPI_MatchFlag</a> = SPI_S_SPMF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca07934a27954d951831e7cdb96c39afd7">kSPI_TxBufferEmptyFlag</a> = SPI_S_SPTEF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca9eca4e759c879e3b264d052c234a09d1">kSPI_ModeFaultFlag</a> = SPI_S_MODF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca840b49c37a729e29d6c144650f31dc88">kSPI_RxFifoNearFullFlag</a> = SPI_S_RNFULLF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca85cc9ec1f4395db09fc288e293e5dcb1">kSPI_TxFifoNearEmptyFlag</a> = SPI_S_TNEAREF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca1ad600ec61b202731d386c7abcb15feb">kSPI_RxFifoFullFlag</a> = SPI_S_TXFULLF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca275d9a4cd902b8cb484c4b00635a3060">kSPI_TxFifoEmptyFlag</a> = SPI_S_RFIFOEF_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896cab1d47ff1dc06aa27a41cf90715f203aa">kSPI_TxFifoError</a> = SPI_CI_TXFERR_MASK &lt;&lt; 8U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca46b6a3bffe664d731bfbfa38f24a5797">kSPI_RxFifoError</a> = SPI_CI_RXFERR_MASK &lt;&lt; 8U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca553c7d65e38657565d1818fdfddd600e">kSPI_TxOverflow</a> = SPI_CI_TXFOF_MASK &lt;&lt; 8U, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggaea776f478792865a85b7311e6ff5896ca92f9ace674410eacc7f5a1bdbbdac23c">kSPI_RxOverflow</a>
<br />
 }<tr class="memdesc:gaea776f478792865a85b7311e6ff5896c"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI status flags.  <a href="group__spi.html#gaea776f478792865a85b7311e6ff5896c">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gaea776f478792865a85b7311e6ff5896c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad61329dc7edac1f4ef75e0746e08b3d1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gad61329dc7edac1f4ef75e0746e08b3d1">spi_w1c_interrupt_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#ggad61329dc7edac1f4ef75e0746e08b3d1a1ee9a347a93f3a74a8c72786747f2a22">kSPI_RxFifoFullClearInterrupt</a> = SPI_CI_SPRFCI_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggad61329dc7edac1f4ef75e0746e08b3d1adc9f4730672a8501f0ae14b25f044567">kSPI_TxFifoEmptyClearInterrupt</a> = SPI_CI_SPTEFCI_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggad61329dc7edac1f4ef75e0746e08b3d1af3a8b77f84cf2406ed1365e02e74fa8a">kSPI_RxNearFullClearInterrupt</a> = SPI_CI_RNFULLFCI_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#ggad61329dc7edac1f4ef75e0746e08b3d1ac5358e4b6907d9db9ec2eb5122f1e15c">kSPI_TxNearEmptyClearInterrupt</a> = SPI_CI_TNEAREFCI_MASK
<br />
 }<tr class="memdesc:gad61329dc7edac1f4ef75e0746e08b3d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI FIFO write-1-to-clear interrupt flags.  <a href="group__spi.html#gad61329dc7edac1f4ef75e0746e08b3d1">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gad61329dc7edac1f4ef75e0746e08b3d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a479127a2051ded7945115657adc162"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga9a479127a2051ded7945115657adc162">spi_txfifo_watermark_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga9a479127a2051ded7945115657adc162a9349658226a7cb7eb0629ae38853030d">kSPI_TxFifoOneFourthEmpty</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga9a479127a2051ded7945115657adc162a1460af596f3d1a6a2bbedd9624975ed5">kSPI_TxFifoOneHalfEmpty</a> = 1
<br />
 }<tr class="memdesc:ga9a479127a2051ded7945115657adc162"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI TX FIFO watermark settings.  <a href="group__spi.html#ga9a479127a2051ded7945115657adc162">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga9a479127a2051ded7945115657adc162"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79f862820ec2bcbb8184ce9de72949a6"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga79f862820ec2bcbb8184ce9de72949a6">spi_rxfifo_watermark_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga79f862820ec2bcbb8184ce9de72949a6ad045f28c12abb7d7c9c69f067d03efb2">kSPI_RxFifoThreeFourthsFull</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga79f862820ec2bcbb8184ce9de72949a6aa10222f6949d379dfaf8f408bbb87c42">kSPI_RxFifoOneHalfFull</a> = 1
<br />
 }<tr class="memdesc:ga79f862820ec2bcbb8184ce9de72949a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI RX FIFO watermark settings.  <a href="group__spi.html#ga79f862820ec2bcbb8184ce9de72949a6">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga79f862820ec2bcbb8184ce9de72949a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ab1fba361ce972e7e249ba1ea318e20"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga8ab1fba361ce972e7e249ba1ea318e20">_spi_dma_enable_t</a> { <br />
&#160;&#160;<a class="el" href="group__spi.html#gga8ab1fba361ce972e7e249ba1ea318e20a0bbf1c58480329e906e2b80a05121cc5">kSPI_TxDmaEnable</a> = SPI_C2_TXDMAE_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga8ab1fba361ce972e7e249ba1ea318e20a0addd2d49971cb0f0caa057510f5d9f1">kSPI_RxDmaEnable</a> = SPI_C2_RXDMAE_MASK, 
<br />
&#160;&#160;<a class="el" href="group__spi.html#gga8ab1fba361ce972e7e249ba1ea318e20aa157e1fb5d95f1488f6f03fb4baaa7f2">kSPI_DmaAllEnable</a> = (SPI_C2_TXDMAE_MASK | SPI_C2_RXDMAE_MASK)
<br />
 }<tr class="memdesc:ga8ab1fba361ce972e7e249ba1ea318e20"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI dma source.  <a href="group__spi.html#ga8ab1fba361ce972e7e249ba1ea318e20">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga8ab1fba361ce972e7e249ba1ea318e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Initialization and deinitialization</h2></td></tr>
<tr class="memitem:ga45c08fc078ae334b79fb844379140838"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga45c08fc078ae334b79fb844379140838">SPI_MasterGetDefaultConfig</a> (<a class="el" href="group__spi.html#structspi__master__config__t">spi_master_config_t</a> *config)</td></tr>
<tr class="memdesc:ga45c08fc078ae334b79fb844379140838"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the SPI master configuration structure to default values.  <a href="#ga45c08fc078ae334b79fb844379140838">More...</a><br /></td></tr>
<tr class="separator:ga45c08fc078ae334b79fb844379140838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3fe5b421b088cc98222b8a214069574b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b">SPI_MasterInit</a> (SPI_Type *base, const <a class="el" href="group__spi.html#structspi__master__config__t">spi_master_config_t</a> *config, uint32_t srcClock_Hz)</td></tr>
<tr class="memdesc:ga3fe5b421b088cc98222b8a214069574b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SPI with master configuration.  <a href="#ga3fe5b421b088cc98222b8a214069574b">More...</a><br /></td></tr>
<tr class="separator:ga3fe5b421b088cc98222b8a214069574b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac000b63ed033f57a9eee342a8c8e67f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gac000b63ed033f57a9eee342a8c8e67f2">SPI_SlaveGetDefaultConfig</a> (<a class="el" href="group__spi.html#structspi__slave__config__t">spi_slave_config_t</a> *config)</td></tr>
<tr class="memdesc:gac000b63ed033f57a9eee342a8c8e67f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the SPI slave configuration structure to default values.  <a href="#gac000b63ed033f57a9eee342a8c8e67f2">More...</a><br /></td></tr>
<tr class="separator:gac000b63ed033f57a9eee342a8c8e67f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91b214b5392fc8d5b73a5ebadc5ca363"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga91b214b5392fc8d5b73a5ebadc5ca363">SPI_SlaveInit</a> (SPI_Type *base, const <a class="el" href="group__spi.html#structspi__slave__config__t">spi_slave_config_t</a> *config)</td></tr>
<tr class="memdesc:ga91b214b5392fc8d5b73a5ebadc5ca363"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SPI with slave configuration.  <a href="#ga91b214b5392fc8d5b73a5ebadc5ca363">More...</a><br /></td></tr>
<tr class="separator:ga91b214b5392fc8d5b73a5ebadc5ca363"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac0bc2b87ea2eb7eeba78d9449d4dbbf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaac0bc2b87ea2eb7eeba78d9449d4dbbf">SPI_Deinit</a> (SPI_Type *base)</td></tr>
<tr class="memdesc:gaac0bc2b87ea2eb7eeba78d9449d4dbbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize SPI.  <a href="#gaac0bc2b87ea2eb7eeba78d9449d4dbbf">More...</a><br /></td></tr>
<tr class="separator:gaac0bc2b87ea2eb7eeba78d9449d4dbbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae5df847701d3171c2e6787b33e2f1ed"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaae5df847701d3171c2e6787b33e2f1ed">SPI_Enable</a> (I2C_Type *base, bool enable)</td></tr>
<tr class="memdesc:gaae5df847701d3171c2e6787b33e2f1ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disables the SPI.  <a href="#gaae5df847701d3171c2e6787b33e2f1ed">More...</a><br /></td></tr>
<tr class="separator:gaae5df847701d3171c2e6787b33e2f1ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Status</h2></td></tr>
<tr class="memitem:gaaa5a317a68b409dfe20397b45e48d1f0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaaa5a317a68b409dfe20397b45e48d1f0">SPI_GetStatusFlags</a> (SPI_Type *base)</td></tr>
<tr class="memdesc:gaaa5a317a68b409dfe20397b45e48d1f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the status flag.  <a href="#gaaa5a317a68b409dfe20397b45e48d1f0">More...</a><br /></td></tr>
<tr class="separator:gaaa5a317a68b409dfe20397b45e48d1f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga57d32103b22e375efde0d1a392f125ea"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga57d32103b22e375efde0d1a392f125ea">SPI_ClearInterrupt</a> (SPI_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga57d32103b22e375efde0d1a392f125ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the interrupt if enable INCTLR.  <a href="#ga57d32103b22e375efde0d1a392f125ea">More...</a><br /></td></tr>
<tr class="separator:ga57d32103b22e375efde0d1a392f125ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Interrupts</h2></td></tr>
<tr class="memitem:gac12d144816080c40ca86d762e31aacc4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gac12d144816080c40ca86d762e31aacc4">SPI_EnableInterrupts</a> (SPI_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:gac12d144816080c40ca86d762e31aacc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable interrupt for SPI.  <a href="#gac12d144816080c40ca86d762e31aacc4">More...</a><br /></td></tr>
<tr class="separator:gac12d144816080c40ca86d762e31aacc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c3de83156f45d3f91540a1ec5f92826"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga1c3de83156f45d3f91540a1ec5f92826">SPI_DisableInterrupts</a> (SPI_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga1c3de83156f45d3f91540a1ec5f92826"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable interrupt for SPI.  <a href="#ga1c3de83156f45d3f91540a1ec5f92826">More...</a><br /></td></tr>
<tr class="separator:ga1c3de83156f45d3f91540a1ec5f92826"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
DMA Control</h2></td></tr>
<tr class="memitem:ga552ce373bfe655a37a22c26fdb071e0b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga552ce373bfe655a37a22c26fdb071e0b">SPI_EnableDMA</a> (SPI_Type *base, uint32_t mask, bool enable)</td></tr>
<tr class="memdesc:ga552ce373bfe655a37a22c26fdb071e0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable dma source for SPI.  <a href="#ga552ce373bfe655a37a22c26fdb071e0b">More...</a><br /></td></tr>
<tr class="separator:ga552ce373bfe655a37a22c26fdb071e0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga740215d83c1238818dfd4689163f71de"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga740215d83c1238818dfd4689163f71de">SPI_GetDataRegisterAddress</a> (SPI_Type *base)</td></tr>
<tr class="memdesc:ga740215d83c1238818dfd4689163f71de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get SPI tx/rx data register address.  <a href="#ga740215d83c1238818dfd4689163f71de">More...</a><br /></td></tr>
<tr class="separator:ga740215d83c1238818dfd4689163f71de"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Bus Operations</h2></td></tr>
<tr class="memitem:ga3ebe045018782edb3624026795d6269a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga3ebe045018782edb3624026795d6269a">SPI_MasterSetBaudRate</a> (SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz)</td></tr>
<tr class="memdesc:ga3ebe045018782edb3624026795d6269a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Baud rate for SPI transfer, this only used in master.  <a href="#ga3ebe045018782edb3624026795d6269a">More...</a><br /></td></tr>
<tr class="separator:ga3ebe045018782edb3624026795d6269a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga981b773ced8cc0df2493691842a14e05"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga981b773ced8cc0df2493691842a14e05">SPI_SetMatchData</a> (SPI_Type *base, uint32_t matchData)</td></tr>
<tr class="memdesc:ga981b773ced8cc0df2493691842a14e05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set match data for SPI.  <a href="#ga981b773ced8cc0df2493691842a14e05">More...</a><br /></td></tr>
<tr class="separator:ga981b773ced8cc0df2493691842a14e05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73f02aa76d813feff22fb3855105e023"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga73f02aa76d813feff22fb3855105e023">SPI_EnableFIFO</a> (SPI_Type *base, bool enable)</td></tr>
<tr class="memdesc:ga73f02aa76d813feff22fb3855105e023"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or Disable FIFO if there is FIFO.  <a href="#ga73f02aa76d813feff22fb3855105e023">More...</a><br /></td></tr>
<tr class="separator:ga73f02aa76d813feff22fb3855105e023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae28a41ba015e3bc92936459f83500cd0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gae28a41ba015e3bc92936459f83500cd0">SPI_WriteBlocking</a> (SPI_Type *base, uint8_t *buffer, size_t size)</td></tr>
<tr class="memdesc:gae28a41ba015e3bc92936459f83500cd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a buffer of data bytes in blocking way.  <a href="#gae28a41ba015e3bc92936459f83500cd0">More...</a><br /></td></tr>
<tr class="separator:gae28a41ba015e3bc92936459f83500cd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74d8732386a607c263bd16c8294b08d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga74d8732386a607c263bd16c8294b08d6">SPI_WriteData</a> (SPI_Type *base, uint16_t data)</td></tr>
<tr class="memdesc:ga74d8732386a607c263bd16c8294b08d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a data into SPI data register.  <a href="#ga74d8732386a607c263bd16c8294b08d6">More...</a><br /></td></tr>
<tr class="separator:ga74d8732386a607c263bd16c8294b08d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf23d3779b122e78fc07562bf5dbf3ac3"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gaf23d3779b122e78fc07562bf5dbf3ac3">SPI_ReadData</a> (SPI_Type *base)</td></tr>
<tr class="memdesc:gaf23d3779b122e78fc07562bf5dbf3ac3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a data from SPI data register.  <a href="#gaf23d3779b122e78fc07562bf5dbf3ac3">More...</a><br /></td></tr>
<tr class="separator:gaf23d3779b122e78fc07562bf5dbf3ac3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Transactional</h2></td></tr>
<tr class="memitem:ga6cf3e807307ecb22578cc9088adafcf2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga6cf3e807307ecb22578cc9088adafcf2">SPI_MasterTransferCreateHandle</a> (SPI_Type *base, spi_master_handle_t *handle, <a class="el" href="group__spi.html#ga75d9df6e4614756d8ff1bd6f86ca2235">spi_master_callback_t</a> callback, void *userData)</td></tr>
<tr class="memdesc:ga6cf3e807307ecb22578cc9088adafcf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the SPI master handle.  <a href="#ga6cf3e807307ecb22578cc9088adafcf2">More...</a><br /></td></tr>
<tr class="separator:ga6cf3e807307ecb22578cc9088adafcf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b05095245ecf01258e64cc0458fb2e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga5b05095245ecf01258e64cc0458fb2e9">SPI_MasterTransferBlocking</a> (SPI_Type *base, <a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:ga5b05095245ecf01258e64cc0458fb2e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transfer a block of data in polling way.  <a href="#ga5b05095245ecf01258e64cc0458fb2e9">More...</a><br /></td></tr>
<tr class="separator:ga5b05095245ecf01258e64cc0458fb2e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga820c78a32fa29735168d2e517f4881a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga820c78a32fa29735168d2e517f4881a1">SPI_MasterTransferNonBlocking</a> (SPI_Type *base, spi_master_handle_t *handle, <a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:ga820c78a32fa29735168d2e517f4881a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a non-blocking SPI interrupt transfer.  <a href="#ga820c78a32fa29735168d2e517f4881a1">More...</a><br /></td></tr>
<tr class="separator:ga820c78a32fa29735168d2e517f4881a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabde0dccfb0783d103b9cf57e0202582f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gabde0dccfb0783d103b9cf57e0202582f">SPI_MasterTransferGetCount</a> (SPI_Type *base, spi_master_handle_t *handle, size_t *count)</td></tr>
<tr class="memdesc:gabde0dccfb0783d103b9cf57e0202582f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the bytes of SPI Interrupt transferred.  <a href="#gabde0dccfb0783d103b9cf57e0202582f">More...</a><br /></td></tr>
<tr class="separator:gabde0dccfb0783d103b9cf57e0202582f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae90962a54978acf05ca7780489301eb4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gae90962a54978acf05ca7780489301eb4">SPI_MasterTransferAbort</a> (SPI_Type *base, spi_master_handle_t *handle)</td></tr>
<tr class="memdesc:gae90962a54978acf05ca7780489301eb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort a SPI transfer using interrupt.  <a href="#gae90962a54978acf05ca7780489301eb4">More...</a><br /></td></tr>
<tr class="separator:gae90962a54978acf05ca7780489301eb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga645d041a92bde312d6cf64517c618c41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga645d041a92bde312d6cf64517c618c41">SPI_MasterTransferHandleIRQ</a> (SPI_Type *base, spi_master_handle_t *handle)</td></tr>
<tr class="memdesc:ga645d041a92bde312d6cf64517c618c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interrupt handler for SPI.  <a href="#ga645d041a92bde312d6cf64517c618c41">More...</a><br /></td></tr>
<tr class="separator:ga645d041a92bde312d6cf64517c618c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7b96130e93f13360909634c8fd5989b2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga7b96130e93f13360909634c8fd5989b2">SPI_SlaveTransferCreateHandle</a> (SPI_Type *base, <a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *handle, <a class="el" href="group__spi.html#ga13fbc3110c56c1d312e4a5ebed07d679">spi_slave_callback_t</a> callback, void *userData)</td></tr>
<tr class="memdesc:ga7b96130e93f13360909634c8fd5989b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the SPI slave handle.  <a href="#ga7b96130e93f13360909634c8fd5989b2">More...</a><br /></td></tr>
<tr class="separator:ga7b96130e93f13360909634c8fd5989b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae37917cb354e36acd1b1ca906d2ffe1c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gae37917cb354e36acd1b1ca906d2ffe1c">SPI_SlaveTransferNonBlocking</a> (SPI_Type *base, <a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *handle, <a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:gae37917cb354e36acd1b1ca906d2ffe1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a non-blocking SPI slave interrupt transfer.  <a href="#gae37917cb354e36acd1b1ca906d2ffe1c">More...</a><br /></td></tr>
<tr class="separator:gae37917cb354e36acd1b1ca906d2ffe1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0dcd2ed8373d992ff93bb500e1442815"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#ga0dcd2ed8373d992ff93bb500e1442815">SPI_SlaveTransferGetCount</a> (SPI_Type *base, <a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *handle, size_t *count)</td></tr>
<tr class="memdesc:ga0dcd2ed8373d992ff93bb500e1442815"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the bytes of SPI Interrupt transferred.  <a href="#ga0dcd2ed8373d992ff93bb500e1442815">More...</a><br /></td></tr>
<tr class="separator:ga0dcd2ed8373d992ff93bb500e1442815"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae719048431a3e4fb334f83bd824a407b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gae719048431a3e4fb334f83bd824a407b">SPI_SlaveTransferAbort</a> (SPI_Type *base, <a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *handle)</td></tr>
<tr class="memdesc:gae719048431a3e4fb334f83bd824a407b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort a SPI slave transfer using interrupt.  <a href="#gae719048431a3e4fb334f83bd824a407b">More...</a><br /></td></tr>
<tr class="separator:gae719048431a3e4fb334f83bd824a407b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf454f42532e8a41340efd398f9868fb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__spi.html#gabf454f42532e8a41340efd398f9868fb">SPI_SlaveTransferHandleIRQ</a> (SPI_Type *base, <a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *handle)</td></tr>
<tr class="memdesc:gabf454f42532e8a41340efd398f9868fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interrupt handler for SPI slave.  <a href="#gabf454f42532e8a41340efd398f9868fb">More...</a><br /></td></tr>
<tr class="separator:gabf454f42532e8a41340efd398f9868fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Usage Information</h2>
<p>The KSDK provides a periphera driver for the Serial Peripheral Interface (SPI) module of Kinetis devices.</p>
<h1><a class="anchor" id="SPIOvw"></a>
Overview</h1>
<p>SPI driver includes functional APIs and transactional APIs.</p>
<p>Functional APIs are feature/property target low level APIs. Functional APIs can be used for SPI initialization/configuration/operation for optimization/customization purpose. Using the functional API requires the knowledge of the SPI peripheral and how to organize functional APIs to meet the application requirements. All functional API use the peripheral base address as the first parameter. SPI functional operation groups provide the functional API set.</p>
<p>Transactional APIs are transaction target high level APIs. Transactional APIs can be used to enable the peripheral and in the application if the code size and performance of transactional APIs satisfy the requirements. If the code size and performance are a critical requirement, see the transactional API implementation and write a custom code. All transactional APIs use the spi_handle_t as the first parameter. Initialize the handle by calling the <a class="el" href="group__spi.html#ga6cf3e807307ecb22578cc9088adafcf2" title="Initialize the SPI master handle. ">SPI_MasterTransferCreateHandle()</a> or <a class="el" href="group__spi.html#ga7b96130e93f13360909634c8fd5989b2" title="Initialize the SPI slave handle. ">SPI_SlaveTransferCreateHandle()</a> API.</p>
<p>Transactional APIs support asynchronous transfer. This means that the functions <a class="el" href="group__spi.html#ga820c78a32fa29735168d2e517f4881a1" title="Performs a non-blocking SPI interrupt transfer. ">SPI_MasterTransferNonBlocking()</a> and <a class="el" href="group__spi.html#gae37917cb354e36acd1b1ca906d2ffe1c" title="Performs a non-blocking SPI slave interrupt transfer. ">SPI_SlaveTransferNonBlocking()</a> set up the interrupt for data transfer. When the transfer completes, the upper layer is notified through a callback function with the kStatus_SPI_Idle status.</p>
<h1><a class="anchor" id="SPIFunc"></a>
Function groups</h1>
<h2><a class="anchor" id="SPIInit"></a>
Initialization and deinitialization</h2>
<p>The <a class="el" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b" title="Initialize SPI with master configuration. ">SPI_MasterInit()</a> and <a class="el" href="group__spi.html#ga91b214b5392fc8d5b73a5ebadc5ca363" title="Initialize SPI with slave configuration. ">SPI_SlaveInit()</a> functions initialize SPI to be a master or slave with specific configurations. The <a class="el" href="group__spi.html#ga45c08fc078ae334b79fb844379140838" title="Set the SPI master configuration structure to default values. ">SPI_MasterGetDefaultConfig()</a> and <a class="el" href="group__spi.html#gac000b63ed033f57a9eee342a8c8e67f2" title="Set the SPI slave configuration structure to default values. ">SPI_SlaveGetDefaultConfig()</a> functions get the default configurations.</p>
<h2><a class="anchor" id="SPIStatus"></a>
Status</h2>
<p>Provides functions to get and clear the SPI status.</p>
<h2><a class="anchor" id="SPIInterrupt"></a>
Interrupt</h2>
<p>Provides functions to enable/disable SPI interrupts.</p>
<h2><a class="anchor" id="SPIDmaCtrl"></a>
DMA Control</h2>
<p>Provides functions to enable/disable SPI to generate the DMA request if the chip support SPI DMA feature.</p>
<h2><a class="anchor" id="SPIBusOperation"></a>
Bus Operations</h2>
<p>Provides functions to set baud rate, enable/disable transfer, to write/read data.</p>
<h2><a class="anchor" id="SPITrans"></a>
Transactional</h2>
<p>Provides functions to transfer data using an interrupt or a DMA method.</p>
<h1><a class="anchor" id="SPICase"></a>
Typical use case</h1>
<h2><a class="anchor" id="SPICaseInterrupt"></a>
SPI master transfer using an interrupt method</h2>
<div class="fragment"><div class="line"><span class="preprocessor">#define BUFFER_LEN (64)</span></div><div class="line">spi_master_handle_t spiHandle;</div><div class="line"><a class="code" href="group__spi.html#structspi__master__config__t">spi_master_config_t</a> masterConfig;</div><div class="line"><a class="code" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> xfer;</div><div class="line"><span class="keyword">volatile</span> <span class="keywordtype">bool</span> isFinished = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"><span class="keyword">const</span> uint8_t sendData[BUFFER_LEN] = [......];</div><div class="line">uint8_t receiveBuff[BUFFER_LEN];</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> SPI_UserCallback(SPI_Type *base, spi_master_handle_t *handle, <a class="code" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> status, <span class="keywordtype">void</span> *userData)</div><div class="line">{</div><div class="line">    isFinished = <span class="keyword">true</span>;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> <a class="code" href="group__bl__core.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">void</span>)</div><div class="line">{</div><div class="line">    <span class="comment">//...</span></div><div class="line"></div><div class="line">    <a class="code" href="group__spi.html#ga45c08fc078ae334b79fb844379140838">SPI_MasterGetDefaultConfig</a>(&amp;masterConfig);</div><div class="line"></div><div class="line">    <a class="code" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b">SPI_MasterInit</a>(SPI0, &amp;masterConfig);</div><div class="line">    <a class="code" href="group__spi.html#ga6cf3e807307ecb22578cc9088adafcf2">SPI_MasterTransferCreateHandle</a>(SPI0, &amp;spiHandle, SPI_UserCallback, NULL);</div><div class="line"></div><div class="line">    <span class="comment">// Prepare to send.</span></div><div class="line">    xfer.<a class="code" href="group__spi.html#a03c054bb486fb65133eb9f6849266fb1">txData</a> = sendData;</div><div class="line">    xfer.<a class="code" href="group__spi.html#ab83c0e07099df7beb8e491cb91914de0">rxData</a> = receiveBuff;</div><div class="line">    xfer.<a class="code" href="group__spi.html#a78f9703861dd365a513c2c5aab9f9239">dataSize</a> = BUFFER_LEN;</div><div class="line"></div><div class="line">    <span class="comment">// Send out.</span></div><div class="line">    <a class="code" href="group__spi.html#ga820c78a32fa29735168d2e517f4881a1">SPI_MasterTransferNonBlocking</a>(SPI0, &amp;spiHandle, &amp;xfer);</div><div class="line"></div><div class="line">    <span class="comment">// Wait send finished.</span></div><div class="line">    <span class="keywordflow">while</span> (!isFinished)</div><div class="line">    {</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// ...</span></div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="SPICaseDma"></a>
SPI Send/receive using a DMA method</h2>
<div class="fragment"><div class="line"><span class="preprocessor">#define BUFFER_LEN (64)</span></div><div class="line">spi_dma_handle_t spiHandle;</div><div class="line">dma_handle_t g_spiTxDmaHandle;</div><div class="line">dma_handle_t g_spiRxDmaHandle;</div><div class="line">spi_config_t masterConfig;</div><div class="line"><a class="code" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> xfer;</div><div class="line"><span class="keyword">volatile</span> <span class="keywordtype">bool</span> isFinished;</div><div class="line">uint8_t sendData[BUFFER_LEN] = ...;</div><div class="line">uint8_t receiveBuff[BUFFER_LEN];</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> SPI_UserCallback(SPI_Type *base, spi_dma_handle_t *handle, <a class="code" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> status, <span class="keywordtype">void</span> *userData)</div><div class="line">{</div><div class="line">    isFinished = <span class="keyword">true</span>;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> <a class="code" href="group__bl__core.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">void</span>)</div><div class="line">{</div><div class="line">    <span class="comment">//...</span></div><div class="line"></div><div class="line">    <a class="code" href="group__spi.html#ga45c08fc078ae334b79fb844379140838">SPI_MasterGetDefaultConfig</a>(&amp;masterConfig);</div><div class="line">    <a class="code" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b">SPI_MasterInit</a>(SPI0, &amp;masterConfig);</div><div class="line"></div><div class="line">    <span class="comment">// Sets up the DMA.</span></div><div class="line">    DMAMUX_Init(DMAMUX0);</div><div class="line">    DMAMUX_SetSource(DMAMUX0, SPI_TX_DMA_CHANNEL, SPI_TX_DMA_REQUEST);</div><div class="line">    DMAMUX_EnableChannel(DMAMUX0, SPI_TX_DMA_CHANNEL);</div><div class="line">    DMAMUX_SetSource(DMAMUX0, SPI_RX_DMA_CHANNEL, SPI_RX_DMA_REQUEST);</div><div class="line">    DMAMUX_EnableChannel(DMAMUX0, SPI_RX_DMA_CHANNEL);</div><div class="line"></div><div class="line">    DMA_Init(DMA0);</div><div class="line"></div><div class="line">    <span class="comment">/* Creates the DMA handle. */</span></div><div class="line">    DMA_CreateHandle(&amp;g_spiTxDmaHandle, DMA0, SPI_TX_DMA_CHANNEL);</div><div class="line">    DMA_CreateHandle(&amp;g_spiRxDmaHandle, DMA0, SPI_RX_DMA_CHANNEL);</div><div class="line"></div><div class="line">    SPI_MasterTransferCreateHandleDMA(SPI0, spiHandle, &amp;g_spiTxDmaHandle, &amp;g_spiRxDmaHandle, SPI_UserCallback, NULL);</div><div class="line"></div><div class="line">    <span class="comment">// Prepares to send.</span></div><div class="line">    xfer.<a class="code" href="group__spi.html#a03c054bb486fb65133eb9f6849266fb1">txData</a> = sendData;</div><div class="line">    xfer.<a class="code" href="group__spi.html#ab83c0e07099df7beb8e491cb91914de0">rxData</a> = receiveBuff;</div><div class="line">    xfer.<a class="code" href="group__spi.html#a78f9703861dd365a513c2c5aab9f9239">dataSize</a> = BUFFER_LEN;</div><div class="line"></div><div class="line">    <span class="comment">// Sends out.</span></div><div class="line">    SPI_MasterTransferDMA(SPI0, &amp;spiHandle, &amp;xfer);</div><div class="line"></div><div class="line">    <span class="comment">// Waits for send to complete.</span></div><div class="line">    <span class="keywordflow">while</span> (!isFinished)</div><div class="line">    {</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// ...</span></div><div class="line">}</div></div><!-- fragment --> <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structspi__master__config__t" id="structspi__master__config__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct spi_master_config_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>SPI master user configure structure. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa5df547b4cb95d3c959373cf6fa672b5"></a>uint32_t</td>
<td class="fieldname">
baudRate_Bps</td>
<td class="fielddoc">
<p>Baud Rate for SPI in Hz </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ac19bf21df94096b28f0cf83f277a91b0"></a><a class="el" href="group__spi.html#gaa7bfe75c1f0ea3b349f19a3de19b24e4">spi_data_bitcount_mode_t</a></td>
<td class="fieldname">
dataMode</td>
<td class="fielddoc">
<p>8bit or 16bit mode </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae8f40fc982ba997f08e6a1fe1fe8fd8c"></a><a class="el" href="group__spi.html#gaa68518c16202382c2e1f1c7c66a9d53d">spi_shift_direction_t</a></td>
<td class="fieldname">
direction</td>
<td class="fielddoc">
<p>MSB or LSB </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af7e84b7c37b316924205ce9d9f0ec685"></a>bool</td>
<td class="fieldname">
enableFifoInterruptClear</td>
<td class="fielddoc">
<p>Enable interrupt clear mechanism </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab8b96ba3ced8b280ac1f366f6e76a9e7"></a>bool</td>
<td class="fieldname">
enableMaster</td>
<td class="fielddoc">
<p>Enable SPI at init time </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a9b8027e0bd0a21915f56155fdc08c5fc"></a>bool</td>
<td class="fieldname">
enableStopInWaitMode</td>
<td class="fielddoc">
<p>SPI stop in wait mode </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a285cf929f1817b37a10f2afffc810ac8"></a><a class="el" href="group__spi.html#ga2e5a238c65f35a2d82cc1c55927030fe">spi_ss_output_mode_t</a></td>
<td class="fieldname">
outputMode</td>
<td class="fielddoc">
<p>SS pin setting </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af7cf10baeb58ef18f8d18ef7022d43d8"></a><a class="el" href="group__spi.html#ga9ad313685ade497f5cbcb71c74a1b4dc">spi_clock_phase_t</a></td>
<td class="fieldname">
phase</td>
<td class="fielddoc">
<p>Clock phase </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab929baca49507045ca23069da9bbe3ba"></a><a class="el" href="group__spi.html#gab55fee4d636428392047e3355f33a36f">spi_pin_mode_t</a></td>
<td class="fieldname">
pinMode</td>
<td class="fielddoc">
<p>SPI pin mode select </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ad5743b187f5dda0c1786a192ba11b043"></a><a class="el" href="group__spi.html#ga3e5a7cd043c9596779bc23b34cb3d1f9">spi_clock_polarity_t</a></td>
<td class="fieldname">
polarity</td>
<td class="fielddoc">
<p>Clock polarity </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a0190e6775edf2ecbae497859f514760f"></a><a class="el" href="group__spi.html#ga79f862820ec2bcbb8184ce9de72949a6">spi_rxfifo_watermark_t</a></td>
<td class="fieldname">
rxWatermark</td>
<td class="fielddoc">
<p>Rx watermark settings </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab4b6047acff1c6e74f90b6e75492295a"></a><a class="el" href="group__spi.html#ga9a479127a2051ded7945115657adc162">spi_txfifo_watermark_t</a></td>
<td class="fieldname">
txWatermark</td>
<td class="fielddoc">
<p>Tx watermark settings </p>
</td></tr>
</table>

</div>
</div>
<a name="structspi__slave__config__t" id="structspi__slave__config__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct spi_slave_config_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>SPI slave user configure structure. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ac19bf21df94096b28f0cf83f277a91b0"></a><a class="el" href="group__spi.html#gaa7bfe75c1f0ea3b349f19a3de19b24e4">spi_data_bitcount_mode_t</a></td>
<td class="fieldname">
dataMode</td>
<td class="fielddoc">
<p>8bit or 16bit mode </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae8f40fc982ba997f08e6a1fe1fe8fd8c"></a><a class="el" href="group__spi.html#gaa68518c16202382c2e1f1c7c66a9d53d">spi_shift_direction_t</a></td>
<td class="fieldname">
direction</td>
<td class="fielddoc">
<p>MSB or LSB </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af7e84b7c37b316924205ce9d9f0ec685"></a>bool</td>
<td class="fieldname">
enableFifoInterruptClear</td>
<td class="fielddoc">
<p>Enable interrupt clear mechanism </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a9189d8f6438ba99548837da162213c46"></a>bool</td>
<td class="fieldname">
enableSlave</td>
<td class="fielddoc">
<p>Enable SPI at init time </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a9b8027e0bd0a21915f56155fdc08c5fc"></a>bool</td>
<td class="fieldname">
enableStopInWaitMode</td>
<td class="fielddoc">
<p>SPI stop in wait mode </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af7cf10baeb58ef18f8d18ef7022d43d8"></a><a class="el" href="group__spi.html#ga9ad313685ade497f5cbcb71c74a1b4dc">spi_clock_phase_t</a></td>
<td class="fieldname">
phase</td>
<td class="fielddoc">
<p>Clock phase </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ad5743b187f5dda0c1786a192ba11b043"></a><a class="el" href="group__spi.html#ga3e5a7cd043c9596779bc23b34cb3d1f9">spi_clock_polarity_t</a></td>
<td class="fieldname">
polarity</td>
<td class="fielddoc">
<p>Clock polarity </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a0190e6775edf2ecbae497859f514760f"></a><a class="el" href="group__spi.html#ga79f862820ec2bcbb8184ce9de72949a6">spi_rxfifo_watermark_t</a></td>
<td class="fieldname">
rxWatermark</td>
<td class="fielddoc">
<p>Rx watermark settings </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab4b6047acff1c6e74f90b6e75492295a"></a><a class="el" href="group__spi.html#ga9a479127a2051ded7945115657adc162">spi_txfifo_watermark_t</a></td>
<td class="fieldname">
txWatermark</td>
<td class="fielddoc">
<p>Tx watermark settings </p>
</td></tr>
</table>

</div>
</div>
<a name="structspi__transfer__t" id="structspi__transfer__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct spi_transfer_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>SPI transfer structure. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a78f9703861dd365a513c2c5aab9f9239"></a>size_t</td>
<td class="fieldname">
dataSize</td>
<td class="fielddoc">
<p>Transfer bytes </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a773b39d480759f67926cb18ae2219281"></a>uint32_t</td>
<td class="fieldname">
flags</td>
<td class="fielddoc">
<p>SPI control flag, useless to SPI. </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab83c0e07099df7beb8e491cb91914de0"></a>uint8_t *</td>
<td class="fieldname">
rxData</td>
<td class="fielddoc">
<p>Receive buffer </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a03c054bb486fb65133eb9f6849266fb1"></a>uint8_t *</td>
<td class="fieldname">
txData</td>
<td class="fielddoc">
<p>Send buffer </p>
</td></tr>
</table>

</div>
</div>
<a name="struct__spi__master__handle" id="struct__spi__master__handle"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct _spi_master_handle</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>SPI transfer handle structure. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a91e259e32d8fb8a07db35bb933c2b6a4"></a>uint8_t</td>
<td class="fieldname">
bytePerFrame</td>
<td class="fielddoc">
<p>SPI mode, 2bytes or 1byte in a frame </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a080452bbb72856f9fc2e834d6537d9ff"></a><a class="el" href="group__spi.html#ga75d9df6e4614756d8ff1bd6f86ca2235">spi_master_callback_t</a></td>
<td class="fieldname">
callback</td>
<td class="fielddoc">
<p>SPI callback </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa58335de5bfa8923228432b62ea9308a"></a>uint8_t *volatile</td>
<td class="fieldname">
rxData</td>
<td class="fielddoc">
<p>Receive buffer </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa7189218ccadddcc71ad7de6b758f01a"></a>volatile size_t</td>
<td class="fieldname">
rxRemainingBytes</td>
<td class="fielddoc">
<p>Receive data remaining in bytes </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a47e491dc6b16e7a86f4396620f4bb704"></a>volatile uint32_t</td>
<td class="fieldname">
state</td>
<td class="fielddoc">
<p>SPI interanl state </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a10e6d1f095e525fa85ffe957081ed7a7"></a>size_t</td>
<td class="fieldname">
transferSize</td>
<td class="fielddoc">
<p>Bytes to be transferred </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab56d8f300582ce9d7f4a79729124739d"></a>uint8_t *volatile</td>
<td class="fieldname">
txData</td>
<td class="fielddoc">
<p>Transfer buffer </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a554cc5b5619072f7256a7f7cc1f2bcdb"></a>volatile size_t</td>
<td class="fieldname">
txRemainingBytes</td>
<td class="fielddoc">
<p>Send data remaining in bytes </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2e294dd14122c554baa0665072b4ca7a"></a>void *</td>
<td class="fieldname">
userData</td>
<td class="fielddoc">
<p>Cllback parameter </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a3585201b190b39d2d702daa9192323a3"></a>uint8_t</td>
<td class="fieldname">
watermark</td>
<td class="fielddoc">
<p>Watermark value for SPI transfer </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga8ab1fba361ce972e7e249ba1ea318e20"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga8ab1fba361ce972e7e249ba1ea318e20">_spi_dma_enable_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI dma source. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga8ab1fba361ce972e7e249ba1ea318e20a0bbf1c58480329e906e2b80a05121cc5"></a>kSPI_TxDmaEnable&#160;</td><td class="fielddoc">
<p>Tx dma request source </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga8ab1fba361ce972e7e249ba1ea318e20a0addd2d49971cb0f0caa057510f5d9f1"></a>kSPI_RxDmaEnable&#160;</td><td class="fielddoc">
<p>Rx dma request source </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga8ab1fba361ce972e7e249ba1ea318e20aa157e1fb5d95f1488f6f03fb4baaa7f2"></a>kSPI_DmaAllEnable&#160;</td><td class="fielddoc">
<p>All dma request source </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gaea776f478792865a85b7311e6ff5896c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#gaea776f478792865a85b7311e6ff5896c">_spi_flags</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI status flags. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896cacc0e5c67e296cc20197afaca46f22953"></a>kSPI_RxBufferFullFlag&#160;</td><td class="fielddoc">
<p>Read buffer full flag </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca9c24fe83960ed64638f06eeb17643da5"></a>kSPI_MatchFlag&#160;</td><td class="fielddoc">
<p>Match flag </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca07934a27954d951831e7cdb96c39afd7"></a>kSPI_TxBufferEmptyFlag&#160;</td><td class="fielddoc">
<p>Transmit buffer empty flag </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca9eca4e759c879e3b264d052c234a09d1"></a>kSPI_ModeFaultFlag&#160;</td><td class="fielddoc">
<p>Mode fault flag </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca840b49c37a729e29d6c144650f31dc88"></a>kSPI_RxFifoNearFullFlag&#160;</td><td class="fielddoc">
<p>Rx FIFO near full </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca85cc9ec1f4395db09fc288e293e5dcb1"></a>kSPI_TxFifoNearEmptyFlag&#160;</td><td class="fielddoc">
<p>Tx FIFO near empty </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca1ad600ec61b202731d386c7abcb15feb"></a>kSPI_RxFifoFullFlag&#160;</td><td class="fielddoc">
<p>Rx fifo full </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca275d9a4cd902b8cb484c4b00635a3060"></a>kSPI_TxFifoEmptyFlag&#160;</td><td class="fielddoc">
<p>Tx fifo empty </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896cab1d47ff1dc06aa27a41cf90715f203aa"></a>kSPI_TxFifoError&#160;</td><td class="fielddoc">
<p>Tx FIFO error </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca46b6a3bffe664d731bfbfa38f24a5797"></a>kSPI_RxFifoError&#160;</td><td class="fielddoc">
<p>Rx FIFO Overflow </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca553c7d65e38657565d1818fdfddd600e"></a>kSPI_TxOverflow&#160;</td><td class="fielddoc">
<p>Tx FIFO Overflow </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaea776f478792865a85b7311e6ff5896ca92f9ace674410eacc7f5a1bdbbdac23c"></a>kSPI_RxOverflow&#160;</td><td class="fielddoc">
<p>Rx FIFO Overflow </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gaedd690a0f91a0a9eb0fd573b57e31f67"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#gaedd690a0f91a0a9eb0fd573b57e31f67">_spi_interrupt_enable</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI interrupt sources. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggaedd690a0f91a0a9eb0fd573b57e31f67aa317b77c827ed1462b766dddd93f7f10"></a>kSPI_RxFullAndModfInterruptEnable&#160;</td><td class="fielddoc">
<p>Receive buffer full (SPRF) and mode fault (MODF) interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaedd690a0f91a0a9eb0fd573b57e31f67abe157750a1660d839a66197c56ac5096"></a>kSPI_TxEmptyInterruptEnable&#160;</td><td class="fielddoc">
<p>Transmit buffer empty interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaedd690a0f91a0a9eb0fd573b57e31f67a95cc9167ada10046534dc22549c6a99e"></a>kSPI_MatchInterruptEnable&#160;</td><td class="fielddoc">
<p>Match interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaedd690a0f91a0a9eb0fd573b57e31f67a081a753d8d51b97b289103c698703537"></a>kSPI_RxFifoNearFullInterruptEnable&#160;</td><td class="fielddoc">
<p>Receive FIFO nearly full interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaedd690a0f91a0a9eb0fd573b57e31f67a299b7d97e4106d57bf06a6654ce4f3dd"></a>kSPI_TxFifoNearEmptyInterruptEnable&#160;</td><td class="fielddoc">
<p>Transmit FIFO nearly empty interrupt </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga3fa79a6717ea4e1e74de2dadaa468edd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga3fa79a6717ea4e1e74de2dadaa468edd">_spi_status</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return status for the SPI driver. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga3fa79a6717ea4e1e74de2dadaa468edda703abdf7900047c4d13536480f3463ab"></a>kStatus_SPI_Busy&#160;</td><td class="fielddoc">
<p>SPI bus is busy </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga3fa79a6717ea4e1e74de2dadaa468edda4e32c5b06dccaf4b81e2fd1679e1b560"></a>kStatus_SPI_Idle&#160;</td><td class="fielddoc">
<p>SPI is idle </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga3fa79a6717ea4e1e74de2dadaa468edda2ff91d774e93aed936b87ffaa18aaf9e"></a>kStatus_SPI_Error&#160;</td><td class="fielddoc">
<p>SPI error </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga9ad313685ade497f5cbcb71c74a1b4dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga9ad313685ade497f5cbcb71c74a1b4dc">spi_clock_phase_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI clock phase configuration. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga9ad313685ade497f5cbcb71c74a1b4dcad15d61c6fd642f13101edbf401d0c72e"></a>kSPI_ClockPhaseFirstEdge&#160;</td><td class="fielddoc">
<p>First edge on SPSCK occurs at the middle of the first cycle of a data transfer. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga9ad313685ade497f5cbcb71c74a1b4dca18a98985c1f7dd56175e4a2724db3675"></a>kSPI_ClockPhaseSecondEdge&#160;</td><td class="fielddoc">
<p>First edge on SPSCK occurs at the start of the first cycle of a data transfer. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga3e5a7cd043c9596779bc23b34cb3d1f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga3e5a7cd043c9596779bc23b34cb3d1f9">spi_clock_polarity_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI clock polarity configuration. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga3e5a7cd043c9596779bc23b34cb3d1f9a031c0ee2693cf1fd621e8b8cba676629"></a>kSPI_ClockPolarityActiveHigh&#160;</td><td class="fielddoc">
<p>Active-high SPI clock (idles low). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga3e5a7cd043c9596779bc23b34cb3d1f9acfc8257079c9604086622df6de326aea"></a>kSPI_ClockPolarityActiveLow&#160;</td><td class="fielddoc">
<p>Active-low SPI clock (idles high). </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gaa7bfe75c1f0ea3b349f19a3de19b24e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#gaa7bfe75c1f0ea3b349f19a3de19b24e4">spi_data_bitcount_mode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI data length mode options. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggaa7bfe75c1f0ea3b349f19a3de19b24e4a1a0723fd8cd73f361ca2770ad74a6324"></a>kSPI_8BitMode&#160;</td><td class="fielddoc">
<p>8-bit data transmission mode </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaa7bfe75c1f0ea3b349f19a3de19b24e4a740c43589ebe839f3adc77b8ca484ea4"></a>kSPI_16BitMode&#160;</td><td class="fielddoc">
<p>16-bit data transmission mode </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gab55fee4d636428392047e3355f33a36f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#gab55fee4d636428392047e3355f33a36f">spi_pin_mode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI pin mode options. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggab55fee4d636428392047e3355f33a36fa7ba3d5ffce8458f91a9594e7ffe2b32d"></a>kSPI_PinModeNormal&#160;</td><td class="fielddoc">
<p>Pins operate in normal, single-direction mode. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggab55fee4d636428392047e3355f33a36fad778c9cc9e3d5a5c4e8061793cf50fdc"></a>kSPI_PinModeInput&#160;</td><td class="fielddoc">
<p>Bidirectional mode. Master: MOSI pin is input; Slave: MISO pin is input. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggab55fee4d636428392047e3355f33a36fad5b79c8eba688dbfb4b9973348521de7"></a>kSPI_PinModeOutput&#160;</td><td class="fielddoc">
<p>Bidirectional mode. Master: MOSI pin is output; Slave: MISO pin is output. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga79f862820ec2bcbb8184ce9de72949a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga79f862820ec2bcbb8184ce9de72949a6">spi_rxfifo_watermark_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI RX FIFO watermark settings. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga79f862820ec2bcbb8184ce9de72949a6ad045f28c12abb7d7c9c69f067d03efb2"></a>kSPI_RxFifoThreeFourthsFull&#160;</td><td class="fielddoc">
<p>SPI rx watermark at 3/4 FIFO size </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga79f862820ec2bcbb8184ce9de72949a6aa10222f6949d379dfaf8f408bbb87c42"></a>kSPI_RxFifoOneHalfFull&#160;</td><td class="fielddoc">
<p>SPI rx watermark at 1/2 FIFO size </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gaa68518c16202382c2e1f1c7c66a9d53d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#gaa68518c16202382c2e1f1c7c66a9d53d">spi_shift_direction_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI data shifter direction options. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggaa68518c16202382c2e1f1c7c66a9d53dae7b997e8cff761aab865cbd42c4c3989"></a>kSPI_MsbFirst&#160;</td><td class="fielddoc">
<p>Data transfers start with most significant bit. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggaa68518c16202382c2e1f1c7c66a9d53da20ac53684c3e1ad338553cecbfab94a9"></a>kSPI_LsbFirst&#160;</td><td class="fielddoc">
<p>Data transfers start with least significant bit. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga2e5a238c65f35a2d82cc1c55927030fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga2e5a238c65f35a2d82cc1c55927030fe">spi_ss_output_mode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI slave select output mode options. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga2e5a238c65f35a2d82cc1c55927030fea3825177650b5d4bfb5dc603f0ce41381"></a>kSPI_SlaveSelectAsGpio&#160;</td><td class="fielddoc">
<p>Slave select pin configured as GPIO. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga2e5a238c65f35a2d82cc1c55927030feafdcbdc624d6c2f057147e2aa3cae4635"></a>kSPI_SlaveSelectFaultInput&#160;</td><td class="fielddoc">
<p>Slave select pin configured for fault detection. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga2e5a238c65f35a2d82cc1c55927030fead724fc04589d03b524ef2dfef6b0f4a1"></a>kSPI_SlaveSelectAutomaticOutput&#160;</td><td class="fielddoc">
<p>Slave select pin configured for automatic SPI output. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga9a479127a2051ded7945115657adc162"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#ga9a479127a2051ded7945115657adc162">spi_txfifo_watermark_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI TX FIFO watermark settings. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga9a479127a2051ded7945115657adc162a9349658226a7cb7eb0629ae38853030d"></a>kSPI_TxFifoOneFourthEmpty&#160;</td><td class="fielddoc">
<p>SPI tx watermark at 1/4 FIFO size </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga9a479127a2051ded7945115657adc162a1460af596f3d1a6a2bbedd9624975ed5"></a>kSPI_TxFifoOneHalfEmpty&#160;</td><td class="fielddoc">
<p>SPI tx watermark at 1/2 FIFO size </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gad61329dc7edac1f4ef75e0746e08b3d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__spi.html#gad61329dc7edac1f4ef75e0746e08b3d1">spi_w1c_interrupt_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI FIFO write-1-to-clear interrupt flags. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggad61329dc7edac1f4ef75e0746e08b3d1a1ee9a347a93f3a74a8c72786747f2a22"></a>kSPI_RxFifoFullClearInterrupt&#160;</td><td class="fielddoc">
<p>Receive FIFO full interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggad61329dc7edac1f4ef75e0746e08b3d1adc9f4730672a8501f0ae14b25f044567"></a>kSPI_TxFifoEmptyClearInterrupt&#160;</td><td class="fielddoc">
<p>Transmit FIFO empty interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggad61329dc7edac1f4ef75e0746e08b3d1af3a8b77f84cf2406ed1365e02e74fa8a"></a>kSPI_RxNearFullClearInterrupt&#160;</td><td class="fielddoc">
<p>Receive FIFO nearly full interrupt </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggad61329dc7edac1f4ef75e0746e08b3d1ac5358e4b6907d9db9ec2eb5122f1e15c"></a>kSPI_TxNearEmptyClearInterrupt&#160;</td><td class="fielddoc">
<p>Transmit FIFO nearly empty interrupt </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga57d32103b22e375efde0d1a392f125ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_ClearInterrupt </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear the interrupt if enable INCTLR. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">interrupt</td><td>Interrupt need to be cleared The parameter could be any combination of the following values: <ul>
<li>kSPIRxFifoFullClearInt </li>
<li>kSPITxFifoEmptyClearInt </li>
<li>kSPIRxNearFullClearInt </li>
<li>kSPITxNearEmptyClearInt </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaac0bc2b87ea2eb7eeba78d9449d4dbbf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_Deinit </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialize SPI. </p>
<p>Call this API will reset the SPI module, gate the spi clock , so the SPI module can not work unless call SPI_MasterInit/SPI_SlaveInit to initialize module.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga1c3de83156f45d3f91540a1ec5f92826"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_DisableInterrupts </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable interrupt for SPI. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">mask</td><td>SPI interrupt source. The parameter could be any combination of the following values: <ul>
<li>kSPI_RxFullAndModfInterruptEnable </li>
<li>kSPI_TxEmptyInterruptEnable </li>
<li>kSPI_MatchInterruptEnable </li>
<li>kSPI_RxFifoNearFullInterruptEnable </li>
<li>kSPI_TxFifoNearEmptyInterruptEnable </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaae5df847701d3171c2e6787b33e2f1ed"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_Enable </td>
          <td>(</td>
          <td class="paramtype">I2C_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable or disables the SPI. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">enable</td><td>pass true to enable module, false to disable module </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga552ce373bfe655a37a22c26fdb071e0b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_EnableDMA </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable dma source for SPI. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">source</td><td>SPI dma source. </td></tr>
    <tr><td class="paramname">enable</td><td>True means enable DMA, false means disable DMA </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga73f02aa76d813feff22fb3855105e023"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_EnableFIFO </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable or Disable FIFO if there is FIFO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">enable</td><td>True means enable FIFO, false means disable FIFO. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac12d144816080c40ca86d762e31aacc4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_EnableInterrupts </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable interrupt for SPI. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">mask</td><td>SPI interrupt source. The parameter could be any combination of the following values: <ul>
<li>kSPI_RxFullAndModfInterruptEnable </li>
<li>kSPI_TxEmptyInterruptEnable </li>
<li>kSPI_MatchInterruptEnable </li>
<li>kSPI_RxFifoNearFullInterruptEnable </li>
<li>kSPI_TxFifoNearEmptyInterruptEnable </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga740215d83c1238818dfd4689163f71de"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t SPI_GetDataRegisterAddress </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get SPI tx/rx data register address. </p>
<p>This API is used to provide transfer address for SPI DMA transfer configuration.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>data register address </dd></dl>

</div>
</div>
<a class="anchor" id="gaaa5a317a68b409dfe20397b45e48d1f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t SPI_GetStatusFlags </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the status flag. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SPI Status, use status flag to AND <a class="el" href="group__spi.html#gaea776f478792865a85b7311e6ff5896c" title="SPI status flags. ">_spi_flags</a> could get the related status. </dd></dl>

</div>
</div>
<a class="anchor" id="ga45c08fc078ae334b79fb844379140838"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_MasterGetDefaultConfig </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__spi.html#structspi__master__config__t">spi_master_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the SPI master configuration structure to default values. </p>
<p>The purpose of this API is to get the config structure initialized for use in <a class="el" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b" title="Initialize SPI with master configuration. ">SPI_MasterInit()</a>. User may use the initialized structure unchanged in <a class="el" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b" title="Initialize SPI with master configuration. ">SPI_MasterInit()</a>, or modify some fields of the structure before calling <a class="el" href="group__spi.html#ga3fe5b421b088cc98222b8a214069574b" title="Initialize SPI with master configuration. ">SPI_MasterInit()</a>. After calling this API, The master is ready to transfer. Example: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;spi_master_config_t config;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;SPI_MasterGetDefaultConfig(&amp;config);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>pointer to master config structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3fe5b421b088cc98222b8a214069574b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_MasterInit </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__spi.html#structspi__master__config__t">spi_master_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>srcClock_Hz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SPI with master configuration. </p>
<p>The configuration structure can be filled by user from scratch, or be set with default values by <a class="el" href="group__spi.html#ga45c08fc078ae334b79fb844379140838" title="Set the SPI master configuration structure to default values. ">SPI_MasterGetDefaultConfig()</a>. After calling this API, the slave is ready to transfer. Example </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;spi_master_config_t config = {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;.baudRate_Bps = 400000,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;...</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;};</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;SPI_MasterInit(SPI0, &amp;config);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">config</td><td>pointer to master config structure </td></tr>
    <tr><td class="paramname">srcClock_Hz</td><td>Source clock frequency. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3ebe045018782edb3624026795d6269a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_MasterSetBaudRate </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>baudRate_Bps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>srcClock_Hz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Baud rate for SPI transfer, this only used in master. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">baudRate_Bps</td><td>Buad Rate needed in Hz. </td></tr>
    <tr><td class="paramname">srcClock_Hz</td><td>SPI source clock frequency in Hz. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae90962a54978acf05ca7780489301eb4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_MasterTransferAbort </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spi_master_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abort a SPI transfer using interrupt. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to SPI transfer handle, this should be a static variable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5b05095245ecf01258e64cc0458fb2e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> SPI_MasterTransferBlocking </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transfer a block of data in polling way. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">xfer</td><td>pointer to spi_xfer_config_t structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Successfully start a transfer. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>Input argument is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6cf3e807307ecb22578cc9088adafcf2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_MasterTransferCreateHandle </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spi_master_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#ga75d9df6e4614756d8ff1bd6f86ca2235">spi_master_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the SPI master handle. </p>
<p>This function initializes the SPI master handle which can be used for other SPI master transactional APIs. Usually, for a specified SPI instance, user need only call this API once to get the initialized handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>SPI handle pointer. </td></tr>
    <tr><td class="paramname">callback</td><td>Callback function. </td></tr>
    <tr><td class="paramname">userData</td><td>User data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabde0dccfb0783d103b9cf57e0202582f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> SPI_MasterTransferGetCount </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spi_master_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the bytes of SPI Interrupt transferred. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to SPI transfer handle, this should be a static variable. </td></tr>
    <tr><td class="paramname">count</td><td>Transferred bytes of SPI master. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_SPI_Success</td><td>Succeed get the transfer count. </td></tr>
    <tr><td class="paramname">kStatus_NoTransferInProgress</td><td>There is not a non-blocking transaction currently in progress. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga645d041a92bde312d6cf64517c618c41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_MasterTransferHandleIRQ </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spi_master_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Interrupt handler for SPI. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>pointer to spi_master_handle_t structure which stores the transfer state. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga820c78a32fa29735168d2e517f4881a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> SPI_MasterTransferNonBlocking </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spi_master_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs a non-blocking SPI interrupt transfer. </p>
<dl class="section note"><dt>Note</dt><dd>Calling the API will immediately return after transfer intialize finished. Users need to call SPI_GetStatusIRQ() to get the transfer status</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>pointer to spi_master_handle_t structure which stores the transfer state </td></tr>
    <tr><td class="paramname">xfer</td><td>pointer to spi_xfer_config_t structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Successfully start a transfer. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>Input argument is invalid. </td></tr>
    <tr><td class="paramname">kStatus_SPI_Busy</td><td>SPI is not idle, is running another transfer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf23d3779b122e78fc07562bf5dbf3ac3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t SPI_ReadData </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a data from SPI data register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data in the register. </dd></dl>

</div>
</div>
<a class="anchor" id="ga981b773ced8cc0df2493691842a14e05"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_SetMatchData </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>matchData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set match data for SPI. </p>
<p>Match Data is a hardware compare value, when the value received in the SPI receive data buffer equals this hardware compare value, the SPI Match Flag in the S register (S[SPMF]) sets, this can also generate a interrupt if the enable bit sets.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">matchData</td><td>Match data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac000b63ed033f57a9eee342a8c8e67f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_SlaveGetDefaultConfig </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__spi.html#structspi__slave__config__t">spi_slave_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the SPI slave configuration structure to default values. </p>
<p>The purpose of this API is to get the config structure initialized for use in <a class="el" href="group__spi.html#ga91b214b5392fc8d5b73a5ebadc5ca363" title="Initialize SPI with slave configuration. ">SPI_SlaveInit()</a>. User need to modify some fields of the structure before calling <a class="el" href="group__spi.html#ga91b214b5392fc8d5b73a5ebadc5ca363" title="Initialize SPI with slave configuration. ">SPI_SlaveInit()</a>. Example: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;spi_slave_config_t config;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;SPI_SlaveGetDefaultConfig(&amp;config);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>pointer to slave config structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga91b214b5392fc8d5b73a5ebadc5ca363"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_SlaveInit </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__spi.html#structspi__slave__config__t">spi_slave_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SPI with slave configuration. </p>
<p>The configuration structure can be filled by user from scratch, or be set with default values by <a class="el" href="group__spi.html#gac000b63ed033f57a9eee342a8c8e67f2" title="Set the SPI slave configuration structure to default values. ">SPI_SlaveGetDefaultConfig()</a>. After calling this API, the slave is ready to transfer. Example </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;spi_slave_config_t config = {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;.polarity = kSPIClockPolarity_ActiveHigh;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;.phase = kSPIClockPhase_FirstEdge;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;.direction = kSPIMsbFirst;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;...</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;};</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;SPI_MasterInit(SPI0, &amp;config);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">config</td><td>pointer to master config structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae719048431a3e4fb334f83bd824a407b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_SlaveTransferAbort </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Abort a SPI slave transfer using interrupt. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to SPI transfer handle, this should be a static variable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7b96130e93f13360909634c8fd5989b2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_SlaveTransferCreateHandle </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#ga13fbc3110c56c1d312e4a5ebed07d679">spi_slave_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize the SPI slave handle. </p>
<p>This function initializes the SPI slave handle which can be used for other SPI slave transactional APIs. Usually, for a specified SPI instance, user need only call this API once to get the initialized handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>SPI handle pointer. </td></tr>
    <tr><td class="paramname">callback</td><td>Callback function. </td></tr>
    <tr><td class="paramname">userData</td><td>User data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0dcd2ed8373d992ff93bb500e1442815"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> SPI_SlaveTransferGetCount </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the bytes of SPI Interrupt transferred. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to SPI transfer handle, this should be a static variable. </td></tr>
    <tr><td class="paramname">count</td><td>Transferred bytes of SPI slave. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_SPI_Success</td><td>Succeed get the transfer count. </td></tr>
    <tr><td class="paramname">kStatus_NoTransferInProgress</td><td>There is not a non-blocking transaction currently in progress. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabf454f42532e8a41340efd398f9868fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void SPI_SlaveTransferHandleIRQ </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Interrupt handler for SPI slave. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>pointer to spi_slave_handle_t structure which stores the transfer state </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae37917cb354e36acd1b1ca906d2ffe1c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__ksdk__common.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> SPI_SlaveTransferNonBlocking </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#gad267cfee3a876b2860217ff94f03f574">spi_slave_handle_t</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__spi.html#structspi__transfer__t">spi_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Performs a non-blocking SPI slave interrupt transfer. </p>
<dl class="section note"><dt>Note</dt><dd>Calling the API will immediately return after transfer intialize finished. Users need to call SPI_GetStatusIRQ() to get the transfer status. </dd>
<dd>
If use SPI with FIFO to do interrupt transfer, the transfer size shall be the integer times of watermark. Or the last data may lost as it cannot generate interrupt request. Users can also call functional API to get the last several receive data.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>pointer to spi_master_handle_t structure which stores the transfer state </td></tr>
    <tr><td class="paramname">xfer</td><td>pointer to spi_xfer_config_t structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Successfully start a transfer. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>Input argument is invalid. </td></tr>
    <tr><td class="paramname">kStatus_SPI_Busy</td><td>SPI is not idle, is running another transfer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae28a41ba015e3bc92936459f83500cd0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_WriteBlocking </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a buffer of data bytes in blocking way. </p>
<dl class="section note"><dt>Note</dt><dd>This function blocks via polling until all bytes have been sent.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">buffer</td><td>The data bytes to send </td></tr>
    <tr><td class="paramname">size</td><td>The number of data bytes to send </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga74d8732386a607c263bd16c8294b08d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_WriteData </td>
          <td>(</td>
          <td class="paramtype">SPI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write a data into SPI data register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SPI base pointer </td></tr>
    <tr><td class="paramname">data</td><td>needs to be write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
